|
thermo28 2.2.2
|
API for configuring and manipulating Thermo 28 Click driver. More...
Topics | |
| Thermo 28 Registers List | |
| List of registers of Thermo 28 Click driver. | |
| Thermo 28 Registers Settings | |
| Settings for registers of Thermo 28 Click driver. | |
| Thermo 28 MikroBUS Map | |
| MikroBUS pin mapping of Thermo 28 Click driver. | |
Functions | |
| void | thermo28_cfg_setup (thermo28_cfg_t *cfg) |
| Thermo 28 configuration object setup function. | |
| err_t | thermo28_init (thermo28_t *ctx, thermo28_cfg_t *cfg) |
| Thermo 28 initialization function. | |
| err_t | thermo28_default_cfg (thermo28_t *ctx) |
| Thermo 28 default configuration function. | |
| err_t | thermo28_generic_write (thermo28_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
| Thermo 28 I2C writing function. | |
| err_t | thermo28_generic_read (thermo28_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
| Thermo 28 I2C reading function. | |
| err_t | thermo28_get_temperature (thermo28_t *ctx, float *temperature) |
| Thermo 28 get temperature function. | |
| err_t | thermo28_set_alert_limits (thermo28_t *ctx, float alert_min, float alert_max) |
| Thermo 28 set alert limits function. | |
| err_t | thermo28_set_config (thermo28_t *ctx, thermo28_config_t config) |
| Thermo 28 set configuration function. | |
| err_t | thermo28_set_continuous_conversion (thermo28_t *ctx) |
| Thermo 28 set continuous conversion function. | |
| err_t | thermo28_set_sleep_mode (thermo28_t *ctx) |
| Thermo 28 set device working mode function. | |
| err_t | thermo28_set_trigger_single_shot (thermo28_t *ctx) |
| Thermo 28 set trigger single-shot function. | |
| uint8_t | thermo28_get_int_pin (thermo28_t *ctx) |
| Thermo 28 set alert status function. | |
API for configuring and manipulating Thermo 28 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void thermo28_cfg_setup | ( | thermo28_cfg_t * | cfg | ) |
Thermo 28 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See thermo28_cfg_t object definition for detailed explanation. |
| err_t thermo28_default_cfg | ( | thermo28_t * | ctx | ) |
Thermo 28 default configuration function.
This function executes a default configuration of Thermo 28 Click board.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermo28_generic_read | ( | thermo28_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out, | ||
| uint8_t | len ) |
Thermo 28 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermo28_generic_write | ( | thermo28_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_in, | ||
| uint8_t | len ) |
Thermo 28 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [in] | data_in | : Data to be written. |
| [in] | len | : Number of bytes to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | uint8_t thermo28_get_int_pin | ( | thermo28_t * | ctx | ) |
Thermo 28 set alert status function.
This function gets alert status by reading the states of the INT pin of the Thermo 28 Click board™.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
0 - Low pin state, 1 - High pin state. | err_t thermo28_get_temperature | ( | thermo28_t * | ctx, |
| float * | temperature ) |
Thermo 28 get temperature function.
This function reads the temperature raw data measurements and converts them to degrees Celsius.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
| [out] | temperature | : Temperature measurements in degrees Celsius. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermo28_init | ( | thermo28_t * | ctx, |
| thermo28_cfg_t * | cfg ) |
Thermo 28 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See thermo28_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermo28_set_alert_limits | ( | thermo28_t * | ctx, |
| float | alert_min, | ||
| float | alert_max ) |
Thermo 28 set alert limits function.
This function sets temperature alert limits values.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
| [in] | alert_min | : Minimum temperature alert limit in degrees Celsius. |
| [in] | alert_max | : Maximum temperature alert limit in degrees Celsius. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermo28_set_config | ( | thermo28_t * | ctx, |
| thermo28_config_t | config ) |
Thermo 28 set configuration function.
This function executes a configuration of the AS6221 Digital Temperature Sensor on the Thermo 28 Click board™.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
| [in] | config | : Device configuration object object. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermo28_set_continuous_conversion | ( | thermo28_t * | ctx | ) |
Thermo 28 set continuous conversion function.
This function executes a configuration of the continuous conversion on the Thermo 28 Click board™.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermo28_set_sleep_mode | ( | thermo28_t * | ctx | ) |
Thermo 28 set device working mode function.
This function executes a configuration of the device's working mode on the Thermo 28 Click board™.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermo28_set_trigger_single_shot | ( | thermo28_t * | ctx | ) |
Thermo 28 set trigger single-shot function.
This function executes a trigger single-shot mode on the Thermo 28 Click board™.
| [in] | ctx | : Click context object. See thermo28_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.